// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.nnee.p_fk.p_a;

import com.nnee.p_a.p_a.cls_g;
import java.io.*;

import org.apache.http.*;

public class cls_j
{

    public cls_j()
    {
    }

    public int a()
    {
        int k = 0;
        if(e == null) {
        	 if(d == null || d.h() == null || g)
                 k = 2;
             else
             if(d.f() < System.currentTimeMillis())
                 k = 1;
        }
 
        return k;

    }

    public void a(cls_g g1)
    {
        d = g1;
    }

    public void a(String s)
    {
        e = s;
    }

    public void a(HttpResponse httpresponse)
    {
        f = httpresponse;
    }

    public void a(boolean flag)
    {
        g = flag;
    }

    public cls_g b()
    {
        return d;
    }

    public String c()
    {
        return e;
    }

    public HttpResponse d()
    {
        return f;
    }

    public int e()
    {
        int k = 200;
        if(f == null) {if(e == null && d == null)
            k = -1;}else {k = f.getStatusLine().getStatusCode();}

        return k;

    }

    public long f()
    {
        long l;
        if(f != null && f.getFirstHeader("Content-Length") != null)
            l = f.getEntity().getContentLength();
        else
            l = -1L;
        return l;
    }

    public InputStream g()
    {Object obj =null;
        if(e == null) {
        	 if(f == null)
                 return null;
             InputStream inputstream1=null;
			try {
				inputstream1 = f.getEntity().getContent();
			} catch (IllegalStateException e1) {
				// TODO Auto-generated catch block
				e1.printStackTrace();
			} catch (IOException e1) {
				// TODO Auto-generated catch block
				e1.printStackTrace();
			}
             obj = inputstream1;
        } else {
        	  try {
				obj =new FileInputStream(e);
			} catch (FileNotFoundException e1) {
				// TODO Auto-generated catch block
				e1.printStackTrace();
			}
        }
        
        
        return ((InputStream) (obj));
//_L1:
//         
//_L6:
//        return ((InputStream) (obj));
//        IOException ioexception2;
//        ioexception2;
//        ioexception2.printStackTrace();
//_L2:
//        if(f == null)
//            break MISSING_BLOCK_LABEL_64;
//        InputStream inputstream1 = f.getEntity().getContent();
//        obj = inputstream1;
//        continue; /* Loop/switch isn't completed */
//        IllegalStateException illegalstateexception;
//        illegalstateexception;
//        illegalstateexception.printStackTrace();
//_L4:
//        if(d == null)
//            break; /* Loop/switch isn't completed */
//        InputStream inputstream = d.k();
//        obj = inputstream;
//        continue; /* Loop/switch isn't completed */
//        IOException ioexception1;
//        ioexception1;
//        ioexception1.printStackTrace();
//        if(true) goto _L4; else goto _L3
//        IOException ioexception;
//        ioexception;
//        ioexception.printStackTrace();
//_L3:
//        obj = null;
//        if(true) goto _L6; else goto _L5
//_L5:
    }

    public String h()
    {
        String s;
        if(d != null)
            s = d.h();
        else
            s = null;
        return s;
    }

    public String i()
    {
    	String s =null;
        if(f == null) {
        	if(d != null)
            {
                s = d.j();
                 
            }
        } else {
        	 Header header = f.getFirstHeader("Content-Encoding");
             if(header == null) {
            	 s = null;
             } else {
            	 s = header.getValue();
             }
        }
        return s;
 
    }

    public String j()
    {
    	String s =null;
        if(f == null) {
        	s = null;
        } else {
        	Header header = f.getFirstHeader("Content-Type");
            if(header == null) {
            	s = null;
            }else {
            	s = header.getValue();
            }
        }
        return s;
    }

    public static final int a = 0;
    public static final int b = 1;
    public static final int c = 2;
    cls_g d;
    String e;
    HttpResponse f;
    boolean g;
}
